'DIRECT X 7 is initialised using a reference type library, in VB5, open the PROJECT menu, then select
'REFERENCES. in the list there will be "DirectX 7 for visual basic type library", with a check next to it.
'When making your own projects you need to select this library.....
'Each DX app needs to declare a DX object, similiar to a control, sub objects such as DSound/DDraw are
'created from this master object:
Dim m_dx As New DirectX7
'Then there is the sub object, DirectSound:
Dim m_ds As DirectSound
'Sound is loaded into BUFFERS, these buffers represent different areas of memory on your sound card
'or system memory. You must have 1 buffer for each .wav file you load. Although you can keep reloading
'different files into the same buffer, you can only have one file in each buffer at any one time. For
'this example, we only need one buffer.
Dim m_dsBuffer As DirectSoundBuffer
Dim m_bLoaded As Boolean
'USED FOR THE LINKS, NOT FOR DX
#If Win32 Then
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
#Else
Private Declare Function ShellExecute Lib "SHELL" (ByVal hwnd%, ByVal lpszOp$, ByVal lpszFile$, ByVal lpszParams$, ByVal lpszDir$, ByVal fsShowCmd%) As Integer
Private Declare Function GetDesktopWindow Lib "USER" () As Integer